
// import BorderlessButton from "@/src/components/borderless-button"
import { PureStandardProps } from "@/src/consts"
import { Button, Image, View ,Text, ITouchEvent} from "@tarojs/components"
// import HomeSection from "./home-section"
import "./group-enter.scss"
import HomeIndexModel from "@/src/lib/models/home_index_model"
import Global from "@/src/lib/global"
// import Global from "@/src/lib/global"

interface GroupEnterProps extends PureStandardProps {
    model?: HomeIndexModel
}

const GroupEnter = (props: GroupEnterProps) => {
    const { model } = props

    let onClick = (e: ITouchEvent<any>) => {
        e.stopPropagation()
        e.preventDefault()

        Global.navigateTo("/pages/group/index", {
            package: "subpackages"
        })

    }

    return (
        // <Button openType="contact" className="buttons">
        <Button className="buttons" onClick={onClick}>
            <View className="buView">
                <View className="lefts">
                    <View className="group-enter-text1">{model?.recommendtip1}</View>
                    <View className="group-enter-text2">{model?.recommendtip2}</View>
                    <View className="group-enter-btn">
                        <Image src={Global.loadImage('btn_bg_group_enter@3x.png')} className="bgs"></Image>
                       <Text className="sstex"> {model?.recommendtip3}</Text>
                    </View>
                </View>
                <View className="rig">
                    <Image mode="aspectFill" className="group-img" src={model?.recommendpic ?? ""}></Image>
                </View>
            </View>

            {/* <HomeSection {...props} backgroundImage="http://r.punkyangsheng.com/xcx/img/images/bg_home_section@3x.png" >
              
                <View>
                    <View className="group-enter-text1">{model?.recommendtip1}</View>
                    <View className="group-enter-text2">{model?.recommendtip2}</View>
                    <BorderlessButton
                        className="group-enter-btn"
                        backgroundImage="btn_bg_group_enter@3x.png">
                        {model?.recommendtip3}
                    </BorderlessButton>
                </View>
                <Image mode="aspectFill" className="group-enter-img" src={model?.recommendpic ?? ""}></Image>
             
            </HomeSection> */}
        </Button>


    )
}

export default GroupEnter